package pub.guoxin.oops.manager.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import pub.guoxin.oops.model.Group;

import javax.validation.constraints.NotNull;

/**
 * Created by guoxin on 17-11-25.
 */
@Data
@ApiModel
public class GroupVo {

    @ApiModelProperty(value = "分组Id")
    private String id;

    @NotNull
    @ApiModelProperty(value = "分组名称", required = true)
    private String name;

    @NotNull
    @ApiModelProperty(value = "子帐户Id")
    private String userId;

    public Group create(){
        Group group = new Group();
        group.setName(this.name);
        group.setUserId(this.userId);
        return group;
    }
}
